main: Automatically (un)set PRELIGHT state on widgets
authorTimm Bäder <mail@baedert.org>
Sun, 21 May 2017 07:27:57 +0000 (09:27 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 25 May 2017 14:25:59 +0000 (16:25 +0200)
gtk/gtkmain.c

index 16c0bbf42b991066fac87ea7ceca8052a214864c..209bb5f228de4f75cf3d1d464fd140a26c0db638 100644 (file)
@@ -1337,6 +1337,11 @@ synth_crossing_for_motion (GtkWidget     *widget,
   if (other_widget)
     event->crossing.subwindow = g_object_ref (gtk_widget_get_window (other_widget));
 
+  if (enter)
+    gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_PRELIGHT, FALSE);
+  else
+    gtk_widget_unset_state_flags (widget, GTK_STATE_FLAG_PRELIGHT);
+
   gdk_event_get_coords (source, &x, &y);
   event->crossing.x = x;
   event->crossing.y = y;